<?php

namespace Category;

/**
 * 分类数据层
 */
class CategoryDAOModel extends \DAO\DAOBase
{
    /**
     * 构造方法
     * CategoryDAOModel constructor.
     */
    public function __construct()
    {
        $this->mysqlDAO = CategoryMysqlModel::getInstance();
    }

    /**
     * 类实例
     *
     * @var \Category\CategoryDAOModel
     */
    private static $_instance = null;

    /**
     * 获取类实例
     *
     * @return \Category\CategoryDAOModel
     */
    public static function getInstance()
    {
        if (!(self::$_instance instanceof self)) {
            self::$_instance = new self();
        }

        return self::$_instance;
    }
}
